package cc.admin.common.constant;

/**
 * 微信公众号API
 */
public class WeChatConstant {

    //服务器token
    public static final String TOKEN = "h3367uN2sKyjjI39zPNLKRDyekRAeFmO";
    //公众号开发者ID
    public static final String APPID="wxa1c969688b21a5f9";
    //公众号开发者密码
    public static final String APPSECRET="16952e9b0cffaf2889f1a7be09b9ff16";

    //获取token-GET请求
    public static final String ACCESS_TOKEN_URL = "https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=" + APPID + "&secret=" + APPSECRET;

    //获取用户token(需要拼接&code=code&grant_type=authorization_code)-GET请求
    public static final String ACCESS_USER_TOKEN_URL = "https://api.weixin.qq.com/sns/oauth2/access_token?appid=" + APPID + "&secret=" + APPSECRET;

    //获取用户信息(需要拼接?access_token=ACCESS_TOKEN&openid=OPENID&lang=zh_CN)-GET请求
    public static final String USER_INFO_URL = "https://api.weixin.qq.com/sns/userinfo";

    //获取关注者列表(需要拼接token)-GET请求
    public static final String USER_LIST_URL = "https://api.weixin.qq.com/cgi-bin/user/get?access_token=";

    //发送客服消息(需要拼接token)-POST请求
    public static final String SEND_CUSTOMER_SERVICE_MSG = "https://api.weixin.qq.com/cgi-bin/message/custom/send?access_token=";

    //发送模板消息(需要拼接token)-POST请求
    public static final String SEND_TEMPLATE_MSG = "https://api.weixin.qq.com/cgi-bin/message/template/send?access_token=";

}
